<?php 
$this->load->view('templates/header');
?>

<div>
    <div class="job_menu">
        <div class="job_menu_ask_question">Ask a Question</div>
        <div class="my_details">My details</div>
        <div class="job_menu_show_job_info">Job info</div>
        <div class="show_billing">Show billing</div>
    </div>
             
    <div class="get_job_dialog" id="get_job_dialog_ask_the_question">
            <h2>Ask a question:</h2>
            <div class="get_job_x"><img src="img/redx.png" width="17"/></div>
        <div class="get_job_dialog_inner">
    
           <?=form_open('job/customer_add_comment')?> 
            <textarea name="content"><?=set_value('content')?></textarea>
            <input type="hidden" name="job_number" value="<?=$this->session->userdata('job_number')?>"/>
            <input type="hidden" name="postcode" value="<?=$this->session->userdata('postcode')?>" />    
        </div>
            <input type="submit" value="Submit" />
            <?=form_close()?>
            <span style="color:red;"><?=validation_errors()?></span>
    </div>
    
    <div class="get_job_dialog" id="get_job_dialog_my_details">
            <h2>My details:</h2>
            <div class="get_job_x"><img src="img/redx.png" width="17"/></div>
        <div class="get_job_dialog_inner">
    
           <?php foreach($customer_details as $customer): ?>
            Customer ID: <?php echo $this->session->userdata('customer_id');?> <br />
            Full name: <?php echo $this->session->userdata('customer_name');?> <br />
            Phone: <?=$customer->phone?><br />
            <?php endforeach; ?>
            
            <br /> 
            My address:     <br />
            <?php foreach($customer_address as $row):?>
            <?=$row->business_name?>  <br /> 
            <?=$row->field1?>  <br />
            <?=$row->field2?>  <br />
            <?=$row->postcode?>  <br />  
            <?php endforeach; ?>
    
        </div>
    </div>
    
    <div class="get_job_dialog" id="get_job_dialog_job_information">
            <h2>Job information:</h2>
            <div class="get_job_x"><img src="img/redx.png" width="17"/></div>
        <div class="get_job_dialog_inner">
    
            Job description: <?=$job_info->job_descr?><br /><br />
            Job type: <?=$job_info->jobtype_descr?><br /><br />
            Booked by <?=$job_info->name?> on <?=$job_info->time?><br /><br />   
            
    
           
    
        </div>
    </div>
    
    <div class="get_job_dialog" id="get_job_dialog_billing_information">
            <h2>Current billing information:</h2>
            <div class="get_job_x"><img src="img/redx.png" width="17"/></div>
        <div class="get_job_dialog_inner">
    
            content
    
        </div>
    </div>
    

<?php foreach ($records as $row ) : ?>
    <div class="dialog 
                    <?php 
                        //is this customer's question?' 
                        if ($row->id == 5){
                            echo ' customer_dialog';
                        }            
                        ?>
        ">
        <span><?php echo $row->descr; ?></span>
        <br />
        <span id="dialog_time"><?=$row->time?></span>    
    </div>
    <div class="dialog_bottom
                    <?php 
                        //is this customer's question?' 
                        if ($row->id == 5){
                            echo ' customer_comment';
                        }            
                        ?>">
                        
        <img src="img/dialog.jpg" style="margin-left:4em;"/><br />
       <img src="img/<?=$row->id?>.jpg" width="40"><br />
       <?=$row->name?>
    </div>
<?php endforeach; ?>
</div>
</div>













<?php echo $this->load->view('templates/footer'); ?>